home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvtools / demos / mfgdemo / mfg_data.c < prev    next >
C/C++ Source or Header  |  1997-05-08  |  5KB  |  124 lines

  1. #ifndef lint
  2. static char SccsId[]= "@(#)mfg_data.c    V1.10    3/15/95";
  3. #endif
  4.  
  5. /*------------------------------------------------------------------
  6. | file name -- mfg_data.c
  7. |-----------------------------------------------------------------*/
  8.  
  9. #include "std.h"
  10. #include "dvstd.h"
  11. #include "dvtools.h"
  12. #include "mfg_vars.h"
  13. #include "mfg_data.h"
  14. #include "mfg_fundecl.h"
  15.  
  16.  
  17. /* DECLARATION global variables for REBIND DATA variables */
  18.  
  19. /* STAMPING AREA */
  20. FLOAT
  21.   stamping_on[NUM_STAMPERS], stamping_auto[NUM_STAMPERS] =
  22. {AUTO, AUTO, AUTO}, stamping_up[NUM_STAMPERS], stamping_temp[NUM_STAMPERS] =
  23. {250, 250, 250}, stamping_pressure[NUM_STAMPERS] =
  24. {400, 425, 375}, total_pcs, accum_pcs;
  25. CHAR
  26.   stamping_status[NUM_STAMPERS][20];
  27.  
  28. /* WELDING AREA */
  29. CHAR
  30.   welding_pgm[NUM_WELDERS][20] =
  31. {"logo/cell 1", "logo/cell 2"}, welding_status[NUM_WELDERS][20], welding_pcs_status[NUM_WELDERS][20];
  32. FLOAT
  33.   welding_unit_id[NUM_WELDERS] =
  34. {101, 102}, welding_on[NUM_WELDERS], welding_temp[NUM_WELDERS] =
  35. {150, 150}, welding_curr[NUM_WELDERS], welding_green_on[NUM_WELDERS], welding_yellow_on[NUM_WELDERS], welding_red_on[NUM_WELDERS], welding_cycle[NUM_WELDERS];
  36.  
  37. /* PAINT SHOP AREA */
  38. FLOAT
  39.   paint_color = 0, oven_temp[NUM_OVENS] =
  40. {375}, oven_prev_temp[NUM_OVENS] =
  41. {375}, oven_set[NUM_OVENS] =
  42. {375}, oven_auto[NUM_OVENS] =
  43. {AUTO}, oven_output[NUM_OVENS] =
  44. {54}, oven_blink[NUM_OVENS] =
  45. {0}, oven_ack[NUM_OVENS] =
  46. {0};
  47.  
  48. /* DECLARATION of varname:data_info table
  49. |       Each time you add a variable to the view that you want
  50. |       to rebind to application data, you should add it to
  51. |       this table.
  52. |
  53. |       If you add an entry to DataTable, make sure you increment
  54. |       MAX_APP_VARS (defined in mfg_data.h) accordingly.
  55. */
  56. DATA_INFO DataInfo[MAX_APP_VARS] =
  57. {
  58.  
  59. /* overview */
  60.   "total_pcs", (ADDRESS) & total_pcs,
  61.  
  62. /*  stamping machine #1 */
  63.   "stamping1_on", (ADDRESS) & stamping_on[0],
  64.   "stamping1_auto", (ADDRESS) & stamping_auto[0],
  65.   "stamping1_up", (ADDRESS) & stamping_up[0],
  66.   "stamping1_temp", (ADDRESS) & stamping_temp[0],
  67.   "stamping1_pressure", (ADDRESS) & stamping_pressure[0],
  68.   "stamping1_status", (ADDRESS) & stamping_status[0][0],
  69.  
  70. /*  stamping machine #2  */
  71.   "stamping2_on", (ADDRESS) & stamping_on[1],
  72.   "stamping2_auto", (ADDRESS) & stamping_auto[1],
  73.   "stamping2_up", (ADDRESS) & stamping_up[1],
  74.   "stamping2_temp", (ADDRESS) & stamping_temp[1],
  75.   "stamping2_pressure", (ADDRESS) & stamping_pressure[1],
  76.   "stamping2_status", (ADDRESS) & stamping_status[1][0],
  77.  
  78. /*  stamping machine #3  */
  79.   "stamping3_on", (ADDRESS) & stamping_on[2],
  80.   "stamping3_auto", (ADDRESS) & stamping_auto[2],
  81.   "stamping3_up", (ADDRESS) & stamping_up[2],
  82.   "stamping3_temp", (ADDRESS) & stamping_temp[2],
  83.   "stamping3_pressure", (ADDRESS) & stamping_pressure[2],
  84.   "stamping3_status", (ADDRESS) & stamping_status[2][0],
  85.  
  86. /*  assembly  */
  87.   "accum_pcs", (ADDRESS) & accum_pcs,
  88.  
  89. /*  welding robot #1  */
  90.   "welding1_status", (ADDRESS) & welding_status[0][0],
  91.   "welding1_pcs_status", (ADDRESS) & welding_pcs_status[0][0],
  92.   "welding1_pgm", (ADDRESS) & welding_pgm[0][0],
  93.   "welding1_unit_id", (ADDRESS) & welding_unit_id[0],
  94.   "welding1_on", (ADDRESS) & welding_on[0],
  95.   "welding1_temp", (ADDRESS) & welding_temp[0],
  96.   "welding1_curr", (ADDRESS) & welding_curr[0],
  97.   "welding1_green_on", (ADDRESS) & welding_green_on[0],
  98.   "welding1_yellow_on", (ADDRESS) & welding_yellow_on[0],
  99.   "welding1_red_on", (ADDRESS) & welding_red_on[0],
  100.   "w1_cycle_step", (ADDRESS) & welding_cycle[0],
  101.  
  102. /*  welding robot #2  */
  103.   "welding2_status", (ADDRESS) & welding_status[1][0],
  104.   "welding2_pcs_status", (ADDRESS) & welding_pcs_status[1][0],
  105.   "welding2_pgm", (ADDRESS) & welding_pgm[1][0],
  106.   "welding2_unit_id", (ADDRESS) & welding_unit_id[1],
  107.   "welding2_on", (ADDRESS) & welding_on[1],
  108.   "welding2_temp", (ADDRESS) & welding_temp[1],
  109.   "welding2_curr", (ADDRESS) & welding_curr[1],
  110.   "welding2_green_on", (ADDRESS) & welding_green_on[1],
  111.   "welding2_yellow_on", (ADDRESS) & welding_yellow_on[1],
  112.   "welding2_red_on", (ADDRESS) & welding_red_on[1],
  113.   "w2_cycle_step", (ADDRESS) & welding_cycle[1],
  114.  
  115. /*  paint shop  */
  116.   "paint_color", (ADDRESS) & paint_color,
  117.   "oven1_temp", (ADDRESS) & oven_temp[0],
  118.   "oven1_set", (ADDRESS) & oven_set[0],
  119.   "oven1_auto", (ADDRESS) & oven_auto[0],
  120.   "oven1_output", (ADDRESS) & oven_output[0],
  121.   "oven1_blink", (ADDRESS) & oven_blink[0],
  122.   "oven1_ack", (ADDRESS) & oven_ack[0],
  123. };
  124.